<template>
	<view>
		<uni-nav-bar left-icon="arrowthinleft" title="房间与桌位" :border="false" :fixed="true" bg="bg-fff" color="#333" @clickLeft="goBack()"></uni-nav-bar>
		<view v-for="(item,index) in cate" :key='index' @click="jump('/pages/my/fangjian_two?cate_id='+item.id+'&shop_id='+shop_id)" class="margin-top-20 bg-fff padding-x-24 padding-y-20 flex align-center justify-between">
			<view class="flex align-center">
				<image style="width: 70rpx;height: 70rpx;"  :src="item.pic"></image>
				<text class="fs-28 color-333 margin-left-24">{{item.name}}</text>
			</view>
			<image src="../../static/img/next2.png" style="width: 14rpx;height: 24rpx;"></image>
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				cate:[],
				shop_id:""
			}
		},
		onLoad(opt) {
			this.shop_id = opt.shop_id;
			this.init()
		},
		methods:{
			init(){
				this.$api.classify({pid:0}).then(res=>{
					if(res.code == 1){
						this.cate = res.data;
					}
				})
			}
		}
	}
</script>

<style>
	page{background: #F7F7F7;}
</style>
